package com.igeek.base.ch0711.Dome2;

/**
 * @Description TODO
 * @Author chenmin
 * @Date 2024/7/11 15:50
 */
public class GrandFather {
    private String name;
    private int age;

    public GrandFather(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void getGrandFather(){
        System.out.println("爷爷的姓名："+getName()+"，年龄："+getAge());
    }

}